//
//  MessagesViewController.h
//  Gabber
//
//  Created by 陆惠国 on 11-8-26.
//  Copyright 2011年 恒生聚源. All rights reserved.
//

#import <UIKit/UIKit.h>
@class Message;

@interface MessagesViewController : UITableViewController <NSFetchedResultsControllerDelegate>
{
    NSFetchedResultsController* _fetchedResultsController;
    NSMutableArray* _items;
    NSMutableDictionary* badge;
    
    NSMutableArray *_sendfaceArray;
    NSMutableArray *_receivefaceArray;
    
}

@property (nonatomic, readonly) NSFetchedResultsController* fetchedResultsController;
@property (nonatomic, retain) NSMutableArray* items;
@property (nonatomic, retain) NSMutableDictionary* badges;

@property (nonatomic, retain) NSMutableArray* sendfaceArray;
@property (nonatomic, retain) NSMutableArray* receivefaceArray;

- (void)configureCell:(UITableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath;
- (Message *)messageForRowAtIndexPath:(NSIndexPath*)indexPath;
- (void)reloadData;
- (void)updateBadge;

@end
